package com.ynny.exception.demo01;

import java.util.ArrayList;
import java.util.List;

public class ExceptionTest03 {

    public static void main(String[] args) {

        String s = "数据";

        s = null;

        List list = null;

        list.add("123");

        //java.lang.NullPointerException:
        // Cannot invoke "String.length()" because "s" is null
        System.out.println(list);



    }
}
